const mongoose = require('mongoose');
// 链接本地数据库
mongoose.connect('mongodb://localhost/test');

const Cat = mongoose.model('Cat', { name: String });
// 循环生成50个信息
for(let i = 0;i< 50; i++) {
    const kitty = new Cat({ name: '喵咪' + i });
    kitty.save().then(() => console.log('meow'));
}
